class Solution {
public:
    int hammingDistance(int x, int y)
    {
        int t = x ^ y;
        int sum = 0;
        while (t > 0)
        {
            t &= t - 1;
            sum++;
        }
        return sum;

    }
};